/**********************************************************************
  The MIT License (MIT)
  Copyright (c) 2012 sunriseyuen

  Permission is hereby granted, free of charge, to any person obtaining
  a copy of this software and associated documentation files
  (the "Software"), to deal in the Software without restriction,
  including without limitation the rights to use, copy, modify, merge,
  publish, distribute, sublicense, and/or sell copies of the Software,
  and to permit persons to whom the Software is furnished to do so,
  subject to the following conditions:

  The above copyright notice and this permission notice shall be included
  in all copies or substantial portions of the Software.

  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
  TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
  THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 ***********************************************************************/

	#define _DEF_CCY_CODE
	#define _ZZDEBUG
	#define _PROJ_DC

	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	

#region Using directives

using System;
using System.Text;
using System.IO;
using System.Xml;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Reflection;
using System.Web;
using System.Web.UI;

using Muki.Framework;
using Muki.Framework.UI;
using Muki.Framework.Business;
using Muki.Framework.Util;
using Muki.UserDefine;
using Muki.Entity;
using Dot.StreamObject;


#endregion

namespace Muki.UserPanel
{

	public class UID02802CV
	{
		public UID02802CV()
		{
		}

		public void setValue()
		{
					_UID02802CEntity.VQT_NO = _Convert.ToString(objVQTMITM_VQT_NO.Text);
					_UID02802CEntity.VQT_DMI = _Convert.ToString(objVQTMITM_VQT_DMI.Text);
					if (_STATUS_DATA["IsPostBack"]=="")
					{
						if (ZZGeneral.XRequest("lnk_VQTMITM_VQT_DMI")!="")
						{
							_UID02802CEntity.VQT_DMI = ZZGeneral.XRequest("lnk_VQTMITM_VQT_DMI");
						}
					}
					_UID02802CEntity.MITEM_AMT = _Convert.ToDecimal(objVQTMITM_MITEM_AMT.Text);
					_UID02802CEntity.MITEM_NAME01 = _Convert.ToString(objVQTMITM_MITEM_NAME01.Text);
					_UID02802CEntity.MITEM_NAME02 = _Convert.ToString(objVQTMITM_MITEM_NAME02.Text);

		}

		public void getValue()
		{
					objWebPanels["UID02802C","XVQT_DMI"]=_Convert.ToString(_UID02802CEntity.VQT_DMI);

					objVQTMITM_VQT_NO.Text=_Convert.ToString(_UID02802CEntity.VQT_NO);
					objVQTMITM_VQT_DMI.Text=_Convert.ToString(_UID02802CEntity.VQT_DMI);
					objVQTMITM_MITEM_AMT.Text=_Convert.ToString(_UID02802CEntity.MITEM_AMT);
					objVQTMITM_MITEM_NAME01.Text=_Convert.ToString(_UID02802CEntity.MITEM_NAME01);
					objVQTMITM_MITEM_NAME02.Text=_Convert.ToString(_UID02802CEntity.MITEM_NAME02);

				objVQTMITM_USECURITY_CODE1.Text=_UID02802CEntity.USECURITY_CODE1;
							objVQTMITM_USECURITY_CODE2.Text=_UID02802CEntity.USECURITY_CODE2;
							objVQTMITM_USECURITY_CODE3.Text=_UID02802CEntity.USECURITY_CODE3;
							objVQTMITM_USECURITY_CODE4.Text=_UID02802CEntity.USECURITY_CODE4;
							objVQTMITM_USECURITY_CODE5.Text=_UID02802CEntity.USECURITY_CODE5;
							objVQTMITM_USECURITY_CODE6.Text=_UID02802CEntity.USECURITY_CODE6;
			
			objVQTMITM_USECURITY_RIGHT.Text = _UID02802CEntity.USECURITY_RIGHT.ToString();
			objVQTMITM_UZADD_DATE.Text      = _UID02802CEntity.UZADD_DATE;
			objVQTMITM_UZADD_USER.Text      = _UID02802CEntity.UZADD_USER;
			objVQTMITM_UZCHG_DATE.Text      = _UID02802CEntity.UZCHG_DATE;
			objVQTMITM_UZCHG_USER.Text      = _UID02802CEntity.UZCHG_USER;
		}

		public void OnInit(HttpContext  objHttpContext)		
		{

			this.UID_CODE = "UID02802C";

			this.DbName = ZZGeneral.DbName();

			_STATUS_DATA.OnInit(objHttpContext);

			_STATUS_DATA["ZZXUID_CODE"] = this.UID_CODE;
			_STATUS_DATA["ZZUSQL_CODE"] = "QID02802C";

			this.ZZEventOpts        = _STATUS_DATA["ZZEventOpts"];
			this.ZZLiveBlock        = _STATUS_DATA["ZZLiveBlock"];
			this.LOGON_LANG         = _STATUS_DATA["LOGON_LANG"];
			this.ZZEventStatus      = _STATUS_DATA["ZZEventStatus"];
			this.ZZEventStage       = _STATUS_DATA["ZZEventStage"];
			this.ZZEventArgs        = _STATUS_DATA["ZZEventArgs"];
			this.ZZVIEW_STATUS_CODE = _STATUS_DATA["ZZVIEW_STATUS_CODE"];
			this.ZZVIEW_STAGEU_CODE = _STATUS_DATA["ZZVIEW_STAGEU_CODE"];

			this.Trans = new StreamContext(this.DbName);

			ZZTrace.Debug(ZFILE_NAME,"...123456...---"+this.ZZLiveBlock);

			XLiveManagement oXLiveManagement=XLiveManagement.getInstance();
			oXLiveManagement.DbName=this.DbName;
			this.ZZLOGON_ID=oXLiveManagement[this.ZZLiveBlock].getValue("LOGON_ID");
			if (this.LOGON_LANG=="")
			{
				this.LOGON_LANG=oXLiveManagement[this.ZZLiveBlock].getValue("LOGON_LANG");
			}

			_Convert.ZZLiveBlock = this.ZZLiveBlock;
			_Convert.Trans       = this.Trans;

			_Captions             = new ZZCaptions();
			_Captions.DbName      = this.DbName;


			_DocsPermission.Trans = this.Trans;

			dbTab objdbTab       = new dbTab();
			objdbTab.UID_CODE    = this.UID_CODE;
			objdbTab.Trans       = this.Trans;
			objdbTab.Create();

			objWebPanels=objdbTab.Panels;

			oWindow.AddPanels(objWebPanels);
			oWindow.Trans       = this.Trans;
			oWindow.ZZLiveBlock = this.ZZLiveBlock;
			oWindow.LOGON_LANG  = this.LOGON_LANG;

			Muki.Framework.ZZSetting oZZSetting = new Muki.Framework.ZZSetting();
			oZZSetting.Trans=this.Trans;

			_Captions.LoadCaption();

#region Quick Search

			_WebOption.Name             = "Txt_Quick_Field";
			_WebOption.STATUS_CODE      = "VIEW";
			_WebOption.VIEW_STATUS_CODE = "VIEW";


			bool ZZLOOKUP_ANY_COLUMN = oZZSetting.getBoolean("ZZLOOKUP_ANY_COLUMN", "YES");
			if (ZZLOOKUP_ANY_COLUMN)
			{
				_WebOption.Add("ZZLOOKUP_ANY_COLUMN",_Captions.Caption(this.UID_CODE,"lbl_ZZLOOKUP_ANY_COLUMN"));
				_WebOption.STATUS_CODE = "HIDDEN";
				_WebOption.VIEW_STAGEU_CODE = "HIDDEN";
			}

					_WebOption.Add("VQTMITM.VQT_NO",_Captions.Caption(this.UID_CODE,"lbl_VQT_NO"));
					_WebOption.Add("VQTMITM.VQT_DMI",_Captions.Caption(this.UID_CODE,"lbl_VQT_DMI"));
					_WebOption.Add("VQTMITM.MITEM_NAME01",_Captions.Caption(this.UID_CODE,"lbl_MITEM_NAME01"));
					_WebOption.Add("VQTMITM.MITEM_NAME02",_Captions.Caption(this.UID_CODE,"lbl_MITEM_NAME02"));

			_WebLookup.UGET_CODE   = "QDD02802C";
			_WebLookup.Trans       = this.Trans;
			_WebLookup.DbName      = this.DbName;
			_WebLookup.XWebOption  = _WebOption;


				oWindow.AddLookUp(_WebLookup);

			XOption objXOption     = new XOption();
			objXOption.UID_CODE    = this.UID_CODE;
			objXOption.Trans       = this.Trans;

			XDepend objXDepend     = new XDepend();
			objXDepend.UID_CODE    = this.UID_CODE;
			objXDepend.Trans       = this.Trans;

			ZZCDF _ZZCDF      = new ZZCDF();
			_ZZCDF.UID_CODE   = this.UID_CODE;
			_ZZCDF.Trans      = this.Trans;

#endregion

			oXForm             = new XForm();
			oXForm.UID_CODE    = this.UID_CODE;
			oXForm.DbName      = this.DbName;


			//oXForm.Trans     = this.Trans;

#region XForm element


#region VQTMITM_VQT_NO
				objVQTMITM_VQT_NO.Name          = "Txt_VQTMITM_VQT_NO";
				objVQTMITM_VQT_NO.OnBlurEvents  = "";
				objVQTMITM_VQT_NO.Length        = 12;
				objVQTMITM_VQT_NO.Height        = 0;
				objVQTMITM_VQT_NO.Decimal_Point = 0;
				objVQTMITM_VQT_NO.STATUS_CODE   = "";
				objVQTMITM_VQT_NO.Compulsory    = false;
				objVQTMITM_VQT_NO.Caption       = _Captions.Caption(this.UID_CODE,"lbl_VQT_NO");
				objVQTMITM_VQT_NO.COLSPAN       = 1;
				objVQTMITM_VQT_NO.ROWSPAN       = 1;
				objVQTMITM_VQT_NO.Index         = 102000;
				objVQTMITM_VQT_NO.NEW_LINE      = true;
				objVQTMITM_VQT_NO.NEW_CELL      = true;
				objVQTMITM_VQT_NO.LINE_REVEAL   = false;


				oXForm.AddObject(objVQTMITM_VQT_NO);



#endregion //VQTMITM_VQT_NO


#region VQTMITM_VQT_DMI
				objVQTMITM_VQT_DMI.Name          = "Txt_VQTMITM_VQT_DMI";
				objVQTMITM_VQT_DMI.OnBlurEvents  = "";
				objVQTMITM_VQT_DMI.Length        = 15;
				objVQTMITM_VQT_DMI.Height        = 0;
				objVQTMITM_VQT_DMI.Decimal_Point = 0;
				objVQTMITM_VQT_DMI.STATUS_CODE   = "HIDDEN";
				objVQTMITM_VQT_DMI.Compulsory    = false;
				objVQTMITM_VQT_DMI.Caption       = _Captions.Caption(this.UID_CODE,"lbl_VQT_DMI");
				objVQTMITM_VQT_DMI.COLSPAN       = 1;
				objVQTMITM_VQT_DMI.ROWSPAN       = 1;
				objVQTMITM_VQT_DMI.Index         = 103000;
				objVQTMITM_VQT_DMI.NEW_LINE      = true;
				objVQTMITM_VQT_DMI.NEW_CELL      = true;
				objVQTMITM_VQT_DMI.LINE_REVEAL   = false;


				oXForm.AddObject(objVQTMITM_VQT_DMI);



#endregion //VQTMITM_VQT_DMI


#region VQTMITM_MITEM_AMT
				objVQTMITM_MITEM_AMT.Name          = "Txt_VQTMITM_MITEM_AMT";
				objVQTMITM_MITEM_AMT.OnBlurEvents  = "";
				objVQTMITM_MITEM_AMT.Length        = 18;
				objVQTMITM_MITEM_AMT.Height        = 0;
				objVQTMITM_MITEM_AMT.Decimal_Point = 2;
				objVQTMITM_MITEM_AMT.STATUS_CODE   = "ADDNEW,UPDATE";
				objVQTMITM_MITEM_AMT.Compulsory    = true;
				objVQTMITM_MITEM_AMT.Caption       = _Captions.Caption(this.UID_CODE,"lbl_MITEM_AMT");
				objVQTMITM_MITEM_AMT.COLSPAN       = 1;
				objVQTMITM_MITEM_AMT.ROWSPAN       = 1;
				objVQTMITM_MITEM_AMT.Index         = 104000;
				objVQTMITM_MITEM_AMT.NEW_LINE      = true;
				objVQTMITM_MITEM_AMT.NEW_CELL      = true;
				objVQTMITM_MITEM_AMT.LINE_REVEAL   = false;


				oXForm.AddObject(objVQTMITM_MITEM_AMT);



#endregion //VQTMITM_MITEM_AMT


#region VQTMITM_MITEM_NAME01
				objVQTMITM_MITEM_NAME01.Name          = "Txt_VQTMITM_MITEM_NAME01";
				objVQTMITM_MITEM_NAME01.OnBlurEvents  = "";
				objVQTMITM_MITEM_NAME01.Length        = 30;
				objVQTMITM_MITEM_NAME01.Height        = 0;
				objVQTMITM_MITEM_NAME01.Decimal_Point = 0;
				objVQTMITM_MITEM_NAME01.STATUS_CODE   = "ADDNEW,UPDATE";
				objVQTMITM_MITEM_NAME01.Compulsory    = true;
				objVQTMITM_MITEM_NAME01.Caption       = _Captions.Caption(this.UID_CODE,"lbl_MITEM_NAME01");
				objVQTMITM_MITEM_NAME01.COLSPAN       = 1;
				objVQTMITM_MITEM_NAME01.ROWSPAN       = 1;
				objVQTMITM_MITEM_NAME01.Index         = 105000;
				objVQTMITM_MITEM_NAME01.NEW_LINE      = true;
				objVQTMITM_MITEM_NAME01.NEW_CELL      = true;
				objVQTMITM_MITEM_NAME01.LINE_REVEAL   = false;


				oXForm.AddObject(objVQTMITM_MITEM_NAME01);



#endregion //VQTMITM_MITEM_NAME01


#region VQTMITM_MITEM_NAME02
				objVQTMITM_MITEM_NAME02.Name          = "Txt_VQTMITM_MITEM_NAME02";
				objVQTMITM_MITEM_NAME02.OnBlurEvents  = "";
				objVQTMITM_MITEM_NAME02.Length        = 30;
				objVQTMITM_MITEM_NAME02.Height        = 0;
				objVQTMITM_MITEM_NAME02.Decimal_Point = 0;
				objVQTMITM_MITEM_NAME02.STATUS_CODE   = "ADDNEW,UPDATE";
				objVQTMITM_MITEM_NAME02.Compulsory    = false;
				objVQTMITM_MITEM_NAME02.Caption       = _Captions.Caption(this.UID_CODE,"lbl_MITEM_NAME02");
				objVQTMITM_MITEM_NAME02.COLSPAN       = 1;
				objVQTMITM_MITEM_NAME02.ROWSPAN       = 1;
				objVQTMITM_MITEM_NAME02.Index         = 106000;
				objVQTMITM_MITEM_NAME02.NEW_LINE      = true;
				objVQTMITM_MITEM_NAME02.NEW_CELL      = true;
				objVQTMITM_MITEM_NAME02.LINE_REVEAL   = false;


				oXForm.AddObject(objVQTMITM_MITEM_NAME02);



#endregion //VQTMITM_MITEM_NAME02


			_ZZCDF.Process();

			foreach (VContexts oVContexts in _ZZCDF.ZZCDFS) 
			{
				AComponent oCDFElement;

				if (oVContexts.getValue("CDF_TP_CODE")=="D")
				{
					oCDFElement=new WebDateBox();
				}else if (oVContexts.getValue("CDF_CODE")=="L")
				{
					oCDFElement=new WebCheckBox();
				}else if (oVContexts.getValue("CDF_CODE")=="N")
				{
					oCDFElement=new WebFloatBox();
				}else{
					oCDFElement=new WebTextBox();
				}

				oCDFElement.Name          = "Txt_CDF_"+oVContexts.getValue("CDF_CODE");
				oCDFElement.Length        = oVContexts.getInteger("CDF_LENGTH");
				oCDFElement.Height        = 1;
				oCDFElement.Decimal_Point = oVContexts.getInteger("DECIMAL_POINT");
				oCDFElement.STATUS_CODE   = oVContexts.getValue("STATUS_CODE");
				oCDFElement.Compulsory    = !oVContexts.getBoolean("COLUMN_NULLABLE");

				if (oVContexts.getValue("LABEL_ID")!="")
				{
					oCDFElement.Caption     =_Captions.Caption(this.UID_CODE,oVContexts.getValue("LABEL_ID"));
				}else{
					oCDFElement.Caption     =oVContexts.getValue("CDF_NAME01");
				}
				oCDFElement.COLSPAN      = 1;
				oCDFElement.ROWSPAN      = 1;
				oCDFElement.Index        = oVContexts.getInteger("ORDINAL");
				oCDFElement.NEW_LINE     = true;
				oCDFElement.NEW_CELL     = true;
				oCDFElement.LINE_REVEAL  = false;

				_ZZCDFElect.Add(oCDFElement);
				oXForm.AddObject(oCDFElement);
			}


#endregion

				if (_DocsPermission.AccessRight(this.UID_CODE,this.ZZLOGON_ID,"SECURITY_CODE")==true)
				{
#region SECURITY_CODE


							objVQTMITM_USECURITY_CODE1.NEW_LINE    =true;
						objVQTMITM_USECURITY_CODE1.Name    = "Txt_VQTMITM_USECURITY_CODE1";
						objVQTMITM_USECURITY_CODE1.Caption = _Captions.Caption(this.UID_CODE,"lbl_USECURITY_CODE1");
						oXForm.AuthObject(objVQTMITM_USECURITY_CODE1);

											objVQTMITM_USECURITY_CODE2.Name    = "Txt_VQTMITM_USECURITY_CODE2";
						objVQTMITM_USECURITY_CODE2.Caption = _Captions.Caption(this.UID_CODE,"lbl_USECURITY_CODE2");
						oXForm.AuthObject(objVQTMITM_USECURITY_CODE2);

												objVQTMITM_USECURITY_CODE3.NEW_LINE    =true;
						objVQTMITM_USECURITY_CODE3.Name    = "Txt_VQTMITM_USECURITY_CODE3";
						objVQTMITM_USECURITY_CODE3.Caption = _Captions.Caption(this.UID_CODE,"lbl_USECURITY_CODE3");
						oXForm.AuthObject(objVQTMITM_USECURITY_CODE3);

											objVQTMITM_USECURITY_CODE4.Name    = "Txt_VQTMITM_USECURITY_CODE4";
						objVQTMITM_USECURITY_CODE4.Caption = _Captions.Caption(this.UID_CODE,"lbl_USECURITY_CODE4");
						oXForm.AuthObject(objVQTMITM_USECURITY_CODE4);

												objVQTMITM_USECURITY_CODE5.NEW_LINE    =true;
						objVQTMITM_USECURITY_CODE5.Name    = "Txt_VQTMITM_USECURITY_CODE5";
						objVQTMITM_USECURITY_CODE5.Caption = _Captions.Caption(this.UID_CODE,"lbl_USECURITY_CODE5");
						oXForm.AuthObject(objVQTMITM_USECURITY_CODE5);

											objVQTMITM_USECURITY_CODE6.Name    = "Txt_VQTMITM_USECURITY_CODE6";
						objVQTMITM_USECURITY_CODE6.Caption = _Captions.Caption(this.UID_CODE,"lbl_USECURITY_CODE6");
						oXForm.AuthObject(objVQTMITM_USECURITY_CODE6);

					#region USECURITY_RIGHT

					objVQTMITM_USECURITY_RIGHT.NEW_LINE = true;
					objVQTMITM_USECURITY_RIGHT.Name     = "Txt_VQTMITM_USECURITY_RIGHT";
					objVQTMITM_USECURITY_RIGHT.Caption  = _Captions.Caption(this.UID_CODE,"lbl_USECURITY_RIGHT");
					oXForm.AuthObject(objVQTMITM_USECURITY_RIGHT);

#endregion

#region USTAGE_CODE

					objVQTMITM_USTAGE_CODE.NEW_LINE = false;
					objVQTMITM_USTAGE_CODE.Name     = "Txt_VQTMITM_USTAGE_CODE";
					objVQTMITM_USTAGE_CODE.Caption  = _Captions.Caption(this.UID_CODE,"lbl_USTAGE_CODE");
					oXForm.AuthObject(objVQTMITM_USTAGE_CODE);

#endregion

#region ZADD_DATE

					objVQTMITM_UZADD_DATE.NEW_LINE = true;
					objVQTMITM_UZADD_DATE.Name     = "Txt_VQTMITM_UZADD_DATE";
					objVQTMITM_UZADD_DATE.Caption  = _Captions.Caption(this.UID_CODE,"lbl_UZADD_DATE");
					oXForm.AuthObject(objVQTMITM_UZADD_DATE);

#endregion

#region ZADD_USER

					objVQTMITM_UZADD_USER.Name    = "Txt_VQTMITM_UZADD_USER";
					objVQTMITM_UZADD_USER.Caption = _Captions.Caption(this.UID_CODE,"lbl_UZADD_USER");
					oXForm.AuthObject(objVQTMITM_UZADD_USER);

#endregion

#region ZCHG_DATE
					objVQTMITM_UZCHG_DATE.NEW_LINE = true;
					objVQTMITM_UZCHG_DATE.Name     = "Txt_VQTMITM_UZCHG_DATE";
					objVQTMITM_UZCHG_DATE.Caption  = _Captions.Caption(this.UID_CODE,"lbl_UZCHG_DATE");
					oXForm.AuthObject(objVQTMITM_UZCHG_DATE);

#endregion

#region ZCHG_USER
					objVQTMITM_UZCHG_USER.Name    = "Txt_VQTMITM_UZCHG_USER";
					objVQTMITM_UZCHG_USER.Caption = _Captions.Caption(this.UID_CODE,"lbl_UZCHG_USER");
					oXForm.AuthObject(objVQTMITM_UZCHG_USER);
#endregion
				}

#endregion

#region UXDIR_CODE
			objDATA_VFS_UXDIR_CODE.Name        = "Txt_DATA_VFS_UXDIR_CODE";
			objDATA_VFS_UXDIR_CODE.Caption     = _Captions.Caption(this.UID_CODE,"lbl_UXDIR_CODE");
			objDATA_VFS_UXDIR_CODE.NEW_CELL    = true;
			objDATA_VFS_UXDIR_CODE.NEW_LINE    = true;
			objDATA_VFS_UXDIR_CODE.Index       = 102002;
			objDATA_VFS_UXDIR_CODE.STATUS_CODE = "HIDDEN";

			oXForm.AddObject(objDATA_VFS_UXDIR_CODE);

#endregion

#region XUID_CODE
			objVQTMITM_XUID_CODE.NEW_LINE = true;
			objVQTMITM_XUID_CODE.Name     = "Txt_VQTMITM_XUID_CODE";
			objVQTMITM_XUID_CODE.Caption  = _Captions.Caption(this.UID_CODE,"lbl_XUID_CODE");
			objVQTMITM_XUID_CODE.Text     = "UID02802C";
			oXForm.AuthObject(objVQTMITM_XUID_CODE);
#endregion

			_Captions.Caption(this.UID_CODE,"lbl_XUID_CODE");

			objXDepend.Process();

			oXForm.AddXDepend(objXDepend.Depends);

			oWindow.AddWebForm(oXForm);

			//if (this.ZZEventStatus=="ADDNEW")
			//{
			//}else if (this.ZZEventStatus=="UPDATE")
			//{
			//}

			_WebCellsPanel.ZZMUKI_EDITION = MUKI_EDITION;
			_WebCellsPanel.Name="Wxf";
			_WebCellsPanel.UID_CODE    = this.UID_CODE;
			_WebCellsPanel.USQL_CODE   = "QID02802C";
			_WebCellsPanel.STATUS_CODE = "VIEW";
			_WebCellsPanel.IsRender    = true;
			_WebCellsPanel.DbName    = this.DbName;
			_WebCellsPanel.PageSize    = 15;
			_WebCellsPanel.OnInit(objHttpContext);
				_WebCellsPanel.WxfLook_Up =true;

				if (_WebCellsPanel.USQL_CODE!="")
				{
					oWindow.AddWxfPanel(_WebCellsPanel);
				}

			oWindow.DbName = this.DbName;
			oWindow.OnInit(objHttpContext);
		}

		public void Render(HtmlTextWriter objTextWriter)
		{

				objWebPanels.setValue("UID02802C","view_status",_WebCellsPanel.VIEW_STATUS);
			objWebPanels["UID02802C","stage"]=this.ZZVIEW_STAGEU_CODE;

#region Toolbar

			dbToolbar objdbToolbar   = new dbToolbar();
			objdbToolbar.BTNS_CODE   = "BASIC;";
			objdbToolbar.UID_CODE    = this.UID_CODE;
			objdbToolbar.Trans       = this.Trans;
			objdbToolbar.DATA_STATUS_CODE = _UID02802CEntity.DATA_STATUS_CODE;


			objdbToolbar.Process();
			objWebBTNS= objdbToolbar.XWebBTNS;

			ZZBTNS oZZBTNS         = new ZZBTNS();
			oZZBTNS.BTNS_CODE      = "UID02802C_FUNS;Basic_VFS";
			oZZBTNS.UID_CODE       = this.UID_CODE;
			oZZBTNS.BTN_CLASS_CODE = "FUNS";
			oZZBTNS.Trans          = this.Trans;
			oZZBTNS.DATA_STATUS_CODE = _UID02802CEntity.DATA_STATUS_CODE;

			oZZBTNS.Process();

			if (oZZBTNS.BTNS!=null)
			{
				//oXForm.AddXFuns(oZZBTNS.BTNS);
			}

			ZZBTNS oPRINTS           = new ZZBTNS();
			oPRINTS.BTNS_CODE        = "ADVANCE;UID02802C";
			oPRINTS.UID_CODE         = this.UID_CODE;
			oPRINTS.BTN_CLASS_CODE   = "PRINT";
			oPRINTS.VIEW_STAGEU_CODE = this.ZZVIEW_STAGEU_CODE;
			oPRINTS.Trans            = this.Trans;
			oPRINTS.DATA_STATUS_CODE = _UID02802CEntity.DATA_STATUS_CODE;

			oPRINTS.Process();

			if (oPRINTS.BTNS!=null)
			{
				//	oXForm.AddXPrints(oPRINTS.BTNS);
			}

			oWindow.AddToolBar(objWebBTNS);
#endregion

			objVQTMITM_USTAGE_CODE.Text=this.ZZVIEW_STAGEU_CODE;



			_STATUS_DATA["ZZVIEW_STATUS_CODE"] = this.ZZVIEW_STATUS_CODE;
			_STATUS_DATA["ZZVIEW_STAGEU_CODE"] = this.ZZVIEW_STAGEU_CODE;

			oWindow.VIEW_STATUS_CODE    = this.ZZVIEW_STATUS_CODE;
			oWindow.VIEW_STAGEU_CODE    = this.ZZVIEW_STAGEU_CODE;


			_WebCellsPanel.Trans    = this.Trans;
			_WebCellsPanel.VIEW_STATUS_CODE    = this.ZZVIEW_STATUS_CODE;
			_WebCellsPanel.VIEW_STAGEU_CODE    = this.ZZVIEW_STAGEU_CODE;
			_WebCellsPanel.ZZEventArgs    = this.ZZEventArgs;
			_WebCellsPanel.Pointer_Value  = _UID02802CEntity.PK_DATA;


				if (_WebCellsPanel.USQL_CODE!="")
				{
									_WebCellsPanel.AddSimpleWhereClause("VQTMITM","VQT_NO",objWebPanels["UID02802A","XVQT_NO"]);


							if (_WebOption.Text!="" && _WebLookup.Text!=""  )
							{
								string cAnyColumn="";
										cAnyColumn=cAnyColumn+";VQTMITM.VQT_NO";
										cAnyColumn=cAnyColumn+";VQTMITM.VQT_DMI";
										cAnyColumn=cAnyColumn+";VQTMITM.MITEM_NAME01";
										cAnyColumn=cAnyColumn+";VQTMITM.MITEM_NAME02";

								ZZTrace.Error(ZFILE_NAME,"lookup_xxxxxx"+_WebOption.Text);
								if (_WebOption.Text.IndexOf(";") >= 0)
								{
									_WebCellsPanel.AddXWhereClause("ZZLOOKUP_ANY_COLUMN",_WebOption.Text,_WebLookup.Text);
								}else if (_WebOption.Text=="ZZLOOKUP_ANY_COLUMN")
								{
									_WebCellsPanel.AddXWhereClause("ZZLOOKUP_ANY_COLUMN",cAnyColumn,_WebLookup.Text);
								}else{
									_WebCellsPanel.AddXWhereClause("",_WebOption.Text,_WebLookup.Text);
								}
							}
					}
			_WebCellsPanel.Process();

			oWindow.WindowsStatus = _STATUS_DATA;
			oWindow.UID_CODE      = "UID02802C";
			oWindow.Template      = "";
			oWindow.Trans         = this.Trans;
			oWindow.Exceptions    = this.Exceptions;
			oWindow.Render(objTextWriter);


			//			Trans.Close();
		}

		private XForm             oXForm;             
		private WebPanels         objWebPanels    = new WebPanels();
		private	XEventArgs        objXEventArgs   = new XEventArgs();
		private ZZDocsPermission  _DocsPermission = new ZZDocsPermission();
		private	XStatus           _STATUS_DATA    = new XStatus();
		private	WebLookup         _WebLookup    = new WebLookup();
		private WebOption         _WebOption    = new WebOption();
		private Window            oWindow         = new Window();
		private WebBTNS           objWebBTNS      = new WebBTNS();
		private WebCellsPanel     _WebCellsPanel  = new WebCellsPanel();

			private WebCaption objVQTMITM_USECURITY_CODE1 =new WebCaption();
					private WebCaption objVQTMITM_USECURITY_CODE2 =new WebCaption();
					private WebCaption objVQTMITM_USECURITY_CODE3 =new WebCaption();
					private WebCaption objVQTMITM_USECURITY_CODE4 =new WebCaption();
					private WebCaption objVQTMITM_USECURITY_CODE5 =new WebCaption();
					private WebCaption objVQTMITM_USECURITY_CODE6 =new WebCaption();
		
		private WebCaption  objVQTMITM_UZADD_DATE      = new WebCaption();
		private WebCaption  objVQTMITM_UZADD_USER      = new WebCaption();
		private WebCaption  objVQTMITM_UZCHG_DATE      = new WebCaption();
		private WebCaption  objVQTMITM_UZCHG_USER      = new WebCaption();
		private WebCaption  objVQTMITM_USECURITY_RIGHT = new WebCaption();
		private WebCaption  objVQTMITM_USTAGE_CODE     = new WebCaption();
		private WebHideBox  objDATA_VFS_UXDIR_CODE           = new WebHideBox();
		private WebCaption  objVQTMITM_XUID_CODE       = new WebCaption();

		private List<AComponent>  _ZZCDFElect     = new List<AComponent>();
		public List<LogisticException> Exceptions = new List<LogisticException>();

		private string         _ATVT_CODE          = "";
		private string         UID_CODE            = "UID02802C";
		private string         _DbName             = "";
		private string         _DATA_STATUS_CODE        = "NONE";
		private string         _LOGON_LANG         = "";
		private string         _ZZLiveBlock        = "";
		private string         _ZZEventOpts        = "";
		private string         _ZZVIEW_STATUS_CODE = "";
		private string         _ZZVIEW_STAGEU_CODE = "";
		private string         _ZZEventStatus      = "";
		private string         _ZZEventStage       = "";
		private string         _ZZEventArgs        = "";
		private string         _ZZLOGON_ID         = "";
		private XConvert       _Convert            = new XConvert();
		private ZZCaptions     _Captions           = new ZZCaptions();
		private UID02802CE   _UID02802CEntity  = new UID02802CE();

		public UID02802CE Entity { get { return  _UID02802CEntity ; } set { _UID02802CEntity = value; }  }

		public string   ZZLookup         { get { return _WebLookup.Text;        } set { _WebLookup.Text        = value; }  }
		public string   ZZWebOption      { get { return _WebOption.Text;        } set { _WebOption.Text        = value; }  }
		public WebPanels ZZPanels         { get { return objWebPanels;        } set { objWebPanels        = value; }  }
		public string  DbName             { get { return _DbName;             } set { _DbName             = value; }  }
		public string  ZZLiveBlock        { get { return _ZZLiveBlock;        } set { _ZZLiveBlock        = value; }  }
		public string  ZZLOGON_ID         { get { return _ZZLOGON_ID;         } set { _ZZLOGON_ID         = value; }  }
		public string  ZZEventOpts        { get { return _ZZEventOpts;        } set { _ZZEventOpts        = value; }  }
		public string  ZZVIEW_STATUS_CODE { get { return _ZZVIEW_STATUS_CODE; } set { _ZZVIEW_STATUS_CODE = value; }  }
		public string  ZZVIEW_STAGEU_CODE { get { return _ZZVIEW_STAGEU_CODE; } set { _ZZVIEW_STAGEU_CODE = value; }  }
		public string  ZZEventStatus      { get { return _ZZEventStatus;      } set { _ZZEventStatus      = value; }  }
		public string  ZZEventStage       { get { return _ZZEventStage;       } set { _ZZEventStage       = value; }  }
		public string  ZZEventArgs        { get { return _ZZEventArgs;        } set { _ZZEventArgs        = value; }  }
		public string  LOGON_LANG         { get { return _LOGON_LANG;         } set { _LOGON_LANG         = value; }  }
		public string  ATVT_CODE          { get { return _ATVT_CODE;          } set { _ATVT_CODE          = value; }  }
		public string  DATA_STATUS_CODE        { get { return _DATA_STATUS_CODE;        } set { _DATA_STATUS_CODE        = value; }  }

		private StreamContext Trans;
#region screen element


					private WebTextBox objVQTMITM_VQT_NO =new WebTextBox();

					private WebTextBox objVQTMITM_VQT_DMI =new WebTextBox();

					private WebFloatBox objVQTMITM_MITEM_AMT =new WebFloatBox();

					private WebTextBox objVQTMITM_MITEM_NAME01 =new WebTextBox();

					private WebTextBox objVQTMITM_MITEM_NAME02 =new WebTextBox();

#endregion
		const  string ZFILE_NAME   ="UID02802CV";
		const  string MUKI_EDITION ="MIN";

	}
}
